from rest_framework import serializers
from apps.ten_auth.models import Recruit, Enterprise,User


class EnterpriseSerializer(serializers.ModelSerializer):
	class Meta:
		model = Enterprise
		fields = "__all__"


class RecruitSerializer(serializers.ModelSerializer):
	enterprise = EnterpriseSerializer(read_only=True)  # 添加嵌套序列化的企业字段


	class Meta:
		model = Recruit
		fields = '__all__'
